A digital value or bit has one of two states--zero or one. A digital word is a sequence of digital values or bits. By way of example, a 16 bit digital word may look as follows: 0100111001010110. Computers operate by processing digital words. It is frequently necessary for a computer to compare two digital words to determine whether they are identical. For example, this operation is necessary when processing addresses of a computer program. A digital word comparator is used in this situation to determine whether a specified address in a computer program matches an address at a cache memory location.
Since the operation of comparing digital words is so prevalent in a computer, it is important to perform it efficiently. The comparison of two digital words must identify whether each bit in a first digital word is identical to a corresponding bit in a second digital word. Thus, if the two bits have identical values (they are both zero or they are both one) then a match exists, as indicated by a low digital value. If a match does not exist (one bit is zero and the other bit is one or one bit is one and the other bit is zero) then the comparison operation fails, as indicated by a digital high value. The foregoing logical processing can be characterized as an exclusive-or operation. This processing can be summarized as follows:
______________________________________ "EXCLUSIVE-OR" TRUTH TABLE FOR A COMPARISON OPERATION VALID BIT 1 VALID BIT 2 OUTPUT ______________________________________ 0 0 0 0 1 1 1 0 1 1 1 0 ______________________________________
For a match to exist between two digital words, all comparison operations between corresponding bits of the two digital words must be satisfied. In other words, a logical one value must be produced by all of the comparison operations. If this occurs, then a match hit signal is generated, otherwise a match miss signal is generated.
In view of the fundamental and widespread role of comparators in computer systems, it is advantageous to improve their performance. In particular, it is advantageous to design a fast comparator that is easy to layout, that is easy to control, and that is immune from process variations.